package com.bieyang.anjia.refresh;

import java.util.ArrayList;
import java.util.List;

import android.app.Application;

import com.bieyang.anjia.viewmodel.BaseViewModel;

/*************************
 * 文件信息***************************** 模块名：AnJia 文件名：BasicHandler.java 创建者：刘松
 * 创建日期： 2015年1月7日 功能描述：
 ***********************************************************/
public class BasicHandler {

	public static Application application;

	public static List<BaseViewModel> handlers = new ArrayList<BaseViewModel>();

	public static void init(Application app) {
		application = app;
	}

	public static void registerHandler(BaseViewModel viewModel) {
		handlers.add(viewModel);
	}

	public static void unRegisterHandler(BaseViewModel viewModel) {
		handlers.remove(viewModel);
	}

	public static final int TYPE_USER_REGISTER = 0x0001;
	public static final int TYPE_USER_LOGIN = 0x0002;
	public static final int TYPE_ALIVE = 0x0003;
	// public static final int TYPE_USER_EXIT = 0x0003;
	public static final int TYPE_USER_LOGOUT = 0x0003;
	public static final int TYPE_ADD_ADDRESS = 0x0004;
	public static final int TYPE_UPDATE_ADDRESS = 0x0005;
	public static final int TYPE_SELECT_ADDRESS = 0x0006;
	public static final int TYPE_ALL_SUB = 0x0007;
	public static final int TYPE_DELETE_SUB = 0x0008;
	public static final int TYPE_UPDATE_SUB_NAME = 0x0009;
	public static final int TYPE_INSERT_DIVICE_STATES = 0x000A;
	public static final int TYPE_QUERY_DIVICE_STATES = 0x000B;
	public static final int TYPE_INSERT_ALARM = 0x000C;
	public static final int TYPE_QUERY_ALARM = 0x000D;
	public static final int TYPE_INSERT_DIVICE_SET = 0x000E;
	public static final int TYPE_QUERY_DIVICE_SET = 0x000F;
	public static final int TYPE_QUERY_USER_INFO = 0x0010;
	public static final int TYPE_UPDATE_USER_INFO = 0x0011;
	public static final int TYPE_UPDATE_PASSWORD = 0x0012;
	public static final int TYPE_UPDATE_MANAGEMENT = 0x0013;
	public static final int TYPE_SELECT_MESSAGE_ALERT = 0x0014;
	public static final int TYPE_SELECT_BOTH = 0x0015;

}
